package com.uubx.utils;

import com.uubx.pojo.User;

/**
 * @Author wuguojun
 * @Date 2021/1/5 16:07
 * @Version 1.0
 */
public class UserThreadLocal {
    private static ThreadLocal<User> tl=new ThreadLocal<User>();

    public static void setUser(User user){
        tl.set(user);
    }

    public static User getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
